<div class="tabber" id="tab1">

	<div class="tabbertab" title="My Characters">
	
		<div id="layout_main_top">
		
		</div>
		<div id="layout_main">
			<div class="admin_menu">
			<a href="index.php?page=panel&amp;action=new"><img src="./images/buttons/user_add.png" alt="" /> Add Character</a>
			</div>
			
			<DIV class="TableHead">
			Your characters
			</DIV>
			<DIV class="layout_large_table_top">
			
			</DIV>
			<DIV class="layout_large_table">
			<table id="main_table" cellspacing='0' >
			<tr class="menu_header">
				<th>Active</th>
				<th>
					<a href="./index.php?page=standings&amp;sort=Class" {popup text="Sort by character Class"  center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#}>
						Class
					</a>
				</th>
				<th class="left">
					<a href="./index.php?page=standings&amp;sort=Name" {popup text="Sort by character Class" center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#}>
						Name
					</a>
				</th>
				<th>
					<a href="./index.php?page=standings&amp;sort=Race" {popup text="Sort by character Race"  center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#}>
						Race
					</a>
				</th>
				<th>
					<a href="./index.php?page=standings&amp;sort=Level" {popup text="Sort by character Level"  center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#}>
						Level
					</a>
				</th>
				{foreach name=categories item=categorie from=$rp_categories}
			
				<th>
				{assign var="cat_name" value=$categorie.category_long_name}
			
			
					<a href="./index.php?page=standings&amp;sort={$categorie.category_short_name}" {popup text="Sort by $cat_name"  center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#}>
					{$categorie.category_short_name}
					</a>
				</th>
				{/foreach}
			
				{foreach name=categories item=attribute_categorie from=$attribute_categories}
			
				<th>
				{assign var="atrib_cat_name" value=$attribute_categorie.name}
			
					<img src="{$attribute_categorie.category_short_name}" alt="{$attribute_categorie.short_name}" width="18" height="18" {popup text="Sort by $atrib_cat_name"  center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} />
			
				</th>
				{/foreach}
				<th>
					&nbsp;
				</th>
			</tr>
			
			{foreach name=standings item=character from=$active_character}
			
			{assign var="name" value=$character.name}
			
			<tr class="{cycle values="row_1,row_2"}" id="panel{$character.player_id}">
				<td><img src="{if $character.active eq 1}./images/buttons/yes.png{else}./images/buttons/no.png{/if}" alt="" width="14" height="14" {popup text="This player is selected as your Active character" center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} /></td>
			
			
			
				<td><img src="./images/classes/{$character.class_picture}" alt="" width="20" height="20" /></td>
				<td class="left">{$character.name}</td>
			
				<td>{$character.race}</td>
				<td>{$character.level}</td>
				{foreach name=categories item=categorie from=$rp_categories}
			
					<td>{if isset($rp[$categorie.category_id][$character.user_id])}{$rp[$categorie.category_id][$character.user_id].rp}{else}0{/if}</td>
			
				{/foreach}
			
				{foreach name=categories item=attribute_categorie from=$attribute_categories}
			
				{assign var="atrib_cat_name" value=$attribute_categorie.name}
				{assign var="atrib_cat_description" value=$attribute_categorie.description}
				{if $attribute_categorie.type eq '1'}
			        <td>
			        {if isset($attributes[$character.player_id][$attribute_categorie.id])}
			            <img src="{if $attributes[$character.player_id][$attribute_categorie.id].value eq 1}./images/buttons/yes.png{else}./images/buttons/no.png{/if}" alt="" width="14" height="14" {popup text="$atrib_cat_description" center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} />
			        {else}
			            <img src="./images/buttons/no.png" alt="" width="14" height="14" {popup text="$atrib_cat_description" center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} />
			        {/if}
			        </td>
				{elseif $attribute_categorie.type eq '2'}
			        <td>{if isset($attributes[$character.player_id][$attribute_categorie.id])}{$attributes[$character.player_id][$attribute_categorie.id].value}{else}0{/if}</td>
				{/if}
			
			
			
				{/foreach}
			
				<td>
			
				{assign var="name" value=$character.name}
				{assign var="script_location" value="2"}
			
				{include file='standings_admin_edit.tpl' assign=editmenu}
				<a href='index.php?page=panel&amp;action=edit&amp;pid={$character.player_id}'><img src="./images/buttons/edit.gif" alt="" {popup text="Edit this character" center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} /></a>
				<img src="./images/buttons/delete.gif" alt="" onclick="javascript:deleteCharacter({$character.player_id}, 'panel')"  {popup text="Delete $name from the system." center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} />
				</td>
			</tr>
			
			{foreachelse}
			<tr class="{cycle values="row_1,row_2"}">
				<td colspan=13>No Active characters could be found.</td>
			</tr>
			
			{/foreach}
			
			<tr class="menu_footer">
				<td colspan=14>
				</td>
			</tr>
			
			{foreach name=standings item=character from=$inactive_character}
			
			{assign var="name" value=$character.name}
			
			<tr class="{cycle values="row_1,row_2"}" id="panel{$character.player_id}">
				<td><a href='index.php?page=panel&amp;action=activate&amp;pid={$character.player_id}'><img src="{if $character.active eq 1}./images/buttons/yes.png{else}./images/buttons/no.png{/if}" alt="" width="14" height="14" {popup text="Click here to make this character your active character" center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} /></a></td>
			
			
			
				<td><img src="./images/classes/{$character.class_picture}" alt="" width="20" height="20" /></td>
				<td class="left">{$character.name}</td>
			
				<td>{$character.race}</td>
				<td>{$character.level}</td>
				{foreach name=categories item=categorie from=$rp_categories}
			
					<td>{if isset($rp[$categorie.category_id][$character.user_id])}{$rp[$categorie.category_id][$character.user_id].rp}{else}0{/if}</td>
			
				{/foreach}
			
				{foreach name=categories item=attribute_categorie from=$attribute_categories}
			
				{assign var="atrib_cat_name" value=$attribute_categorie.name}
				{assign var="atrib_cat_description" value=$attribute_categorie.description}
				{if $attribute_categorie.type eq '1'}
			        <td>
			        {if isset($attributes[$character.player_id][$attribute_categorie.id])}
			            <img src="{if $attributes[$character.player_id][$attribute_categorie.id].value eq 1}./images/buttons/yes.png{else}./images/buttons/no.png{/if}" alt="" width="14" height="14" {popup text="$atrib_cat_description" center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} />
			        {else}
			            <img src="./images/buttons/no.png" alt="" width="14" height="14" {popup text="$atrib_cat_description" center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} />
			        {/if}
			        </td>
				{elseif $attribute_categorie.type eq '2'}
			        <td>{if isset($attributes[$character.player_id][$attribute_categorie.id])}{$attributes[$character.player_id][$attribute_categorie.id].value}{else}0{/if}</td>
				{/if}
			
			
			
				{/foreach}
			
				<td>
			
				{assign var="name" value=$character.name}
				{assign var="script_location" value="2"}
			
				{include file='standings_admin_edit.tpl' assign=editmenu}
				<a href='index.php?page=panel&amp;action=edit&amp;pid={$character.player_id}'><img src="./images/buttons/edit.gif" alt="" {popup text="Edit this character" center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} /></a>
				<img src="./images/buttons/delete.gif" alt="" onclick="javascript:deleteCharacter({$character.player_id}, 'panel')"  {popup text="Delete $name from the system." center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} />
				</td>
			</tr>
			
			{foreachelse}
			<tr class="{cycle values="row_1,row_2"}">
				<td colspan=13>No Inactive characters could be found.</td>
			</tr>
			
			{/foreach}
			
			<tr class="menu_footer">
				<td colspan=14>
				
				</td>
			</tr>
			
			</table>
			</DIV>
			<DIV class="layout_large_table_bottom">
			
			</DIV>
		</div>
	</div>
	
	<div class="tabbertab" title="My Raids">
	
		<div id="layout_main_top">
		
		</div>
		<div id="layout_main">
		
			<DIV class="TableHead">
			Future signed on raids
			</DIV>
			<DIV class="layout_large_table_top">
			
			</DIV>
			<DIV class="layout_large_table">
			<table id="main_table" cellspacing='0'>
			<tr class="menu_header">
				<th>
					&nbsp;
					&nbsp;
				</th>
				<th>
						Location
				</th>
				<th>
						Date
				</th>
				<th>
						Time
				</th>
				<th>
						# Main
				</th>
				<th>
						# Sub
				</th>
				<th>
						Limit
				</th>
				<th>
						Description
				</th>
				<th>
					&nbsp;
					&nbsp;
				</th>
			</tr>
			
			{foreach name=player_raids item=cur_raid from=$player_raids}
			
			<tr class="{cycle values="row_1,row_2"}">
				<td>
				{if $current_time gt $cur_raid.close_time}
					<img src="./images/buttons/frozen.png" height="14px" width="14px" {popup text="The raid is frozen! You cannot unsign anymore!" center=#overlib_center# wrap=true offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor# width=145}></img>
				{else}
					<a href="index.php?page=panel&action=unsign&rid={$cur_raid.raid_id}"><img src="./images/buttons/cancel.gif" height="14px" width="14px"></img></a>
				{/if}
				</td>
				<td>
					{$cur_raid.event_name}
				</td>
				<td>
					{$cur_raid.date_time|date_format:"%a %d/%m/%y"}
				</td>
				<td>
					{$cur_raid.date_time|date_format:"%H:%M:%S"}
				</td>
				<td>
					{$cur_raid.signups}/{$cur_raid.no_players}
				</td>
				<td>
					{$cur_raid.subs}/{$cur_raid.substitute_max}
				</td>
				<td>
					{$cur_raid.class_max}
				</td>
				<td>
				{if $cur_raid.description|count_characters gt 30}
				<a href="#" {popup text=$cur_raid.description|nl2br  center=#overlib_center# wrap=true offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor# width=200} >{$cur_raid.description|truncate:24:"..."}</a>
				{else}
				{$cur_raid.description}
				{/if}
				</td>
				<td><img border=0 onclick="triggernow('{$cur_raid.raid_id}' , 'detailsimage{$cur_raid.raid_id}', 'images/details.gif', 'images/details_minus.gif', {$smarty.session.uid})" src='images/details.gif' name='detailsimage{$cur_raid.raid_id}' alt="" /></td>
			</tr>
			<tr class="small">
				<td colspan="10">
					<DIV id="{$cur_raid.raid_id}" class="hidden">
						Loading...
					</DIV>
				</td>
			</tr>
			{foreachelse}
				<tr class="{cycle values="row_1,row_2"}">
					<td colspan=10>No raids could be found.</td>
				</tr>
			{/foreach}
			
			<tr class="menu_footer">
				<td colspan=10></td>
			</tr>
			
			</table>
			<br />
			</DIV>
			<DIV class="layout_large_table_bottom">
			
			</DIV>
		</div>
	</div>
	<div class="tabbertab" title="My Profile">
		
		<div id="layout_main_top">
		
		</div>
		<div id="layout_main">
	
	<DIV class="TableHead">
	User administration
	</DIV>
	<DIV class="layout_large_table_top">
	
	</DIV>
	<DIV class="layout_large_table">
	
	<form action='index.php?page=panel' method='post' name='useredit'>
	<INPUT TYPE=HIDDEN NAME='action' value='usersave'>
	<INPUT TYPE=HIDDEN NAME='username' value='{$user_information.username}'>
	
	  <table id='small_table' cellspacing='0'>
	    <tr class='menu_header'>
	  	</tr>
	  	<tr class='row_1'>
		<td colspan='3' class='staticboldcenter'>
		<span class='error'>{$useredit_errormessage}</span><br>
		</td>
		</tr>
	  	<tr class='row_1'>
			<td class='staticboldright'>
			<br>
			</td>
			<td class='autonormaltop'>
			<br>
			</td>
			<td class='autonormaltopright' width='16px'>
			<br>
			</td>
		</tr>
	  	<tr class='row_1'>
			<td class='staticboldright'>
				Name:
	
			</td>
			<td class='autonormalcenter'>
				<input type='text' id='name' class='largetext' name='name' value='{$user_information.name}'>
			</td>
			<td class='autonormal'>
	
			</td>
		</tr>
	  	<tr class='row_1'>
			<td class='staticboldright'>
				Username:
	
			</td>
			<td class='autonormalcenter'>
			  <input type='text' id='username' class='disabled_largetext' name='username' value='{$user_information.username}' disabled>
			</td>
			<td class='autonormal'>
	
			</td>
		</tr>
	  	<tr class='row_1'>
			<td class='staticboldright'>
				Email:
	
			</td>
			<td class='autonormalcenter'>
				<input type='text' id='email' class='largetext' name='email' value='{$user_information.email}'>
			</td>
			<td class='autonormal'>
	
			</td>
		</tr>
	  	<tr class='row_1'>
			<td class='staticboldright'>
			<br>
			</td>
			<td class='autonormalcenter'>
			</td>
			<td class='autonormal'>
	
			</td>
		</tr>
	  	<tr class='row_1'>
			<td class='staticboldright'>
				New password:
	
			</td>
			<td class='autonormalcenter'>
				<input type='password' id='password1' class='largetext' name='password1' value=''>
			</td>
			<td class='autonormal'>
	
			</td>
		</tr>
	  	<tr class='row_1'>
			<td class='staticboldright'>
				Repeat password:
	
			</td>
			<td class='autonormalcenter'>
				<input type='password' id='password2' class='largetext' name='password2' value=''>
			</td>
			<td class='autonormal'>
	
			</td>
		</tr>
	
	  	<tr class='row_1'>
			<td class='staticboldright'>
			<br>
			</td>
			<td class='autonormalcenter'>
			</td>
			<td class='autonormal'>
	
			</td>
		</tr>
	  	<tr class="row_1">
			<td class="staticboldright">
				Class Display:
			</td>
			<td class="autonormalcenter">
			<select name="class_display" id="class_display" class="large">
				<option value="1">Icons only</option>
				<option value="2">Coloured player names only</option>
				<option value="3">Icons and Coloured player names</option>
			</select>
			</td>
			<td class="autonormal">
			</td>
		</tr>
		
	  	<tr class='row_1'>
			<td class='staticboldright'>
			<br>
			</td>
			<td class='autonormalbottom'>
			<br>
			</td>
			<td class='autonormalbottomright'>
			&nbsp;
			</td>
		</tr>
		
		
		<tr class='row_1'>
			<td class='staticboldcenter' colspan='3'>
			<br>
			      <input name='updateuser' type='submit' value='Update'>
			</td>
		</tr>
	 </table>
	</form>
	</div>
	
	<DIV class="layout_large_table_bottom">
	
	</DIV>
	</DIV>
	
	</div>
	<div id="layout_main_bottom">
	
	</div>
</div>
